package com.zrwl.poscloud.base.enums;

/**
 * 文件类型
 */
public enum EFileType{

    IMAGE(1, "图片"),
    DOCUMENT(2, "文档"),
    VIDEO(3, "视频"),
    AUDIO(4, "音频");

    private final int type;
    private final String name;
    EFileType(int type, String name) {
        this.type = type;
        this.name = name;
    }
    public int getType() {return type;}
    public String getName() {
        return name;
    }
    public static EFileType getByValue(int value) {
        for (EFileType fileType : values()) {
            if (fileType.getType() == value) {
                return fileType;
            }
        }
        return null;
    }
}